home *** CD-ROM | disk | FTP | other *** search
- Path: antares.dfma.com!news
- From: johnb@dfma.com (John Breckenridge)
- Newsgroups: comp.lang.pascal.misc,comp.lang.c++,comp.lang.c,comp.lang.pascal.borland
- Subject: Re: Tough FACTORIAL math problem...
- Date: Fri, 23 Feb 1996 00:38:45 GMT
- Organization: Boothroyd Dewhurst, Inc.
- Message-ID: <4gintg$1f7@antares.dfma.com>
- References: <4fr8be$ass@news.iconn.net> <4g0giv$94s@sun132.spd.dsccc.com> <4gbsir$opr@axl02it.ntc.nokia.com>
- NNTP-Posting-Host: johnb.dfma.com
- X-Newsreader: Forte Free Agent 1.0.82
-
- Risto Lankinen <risto.lankinen@ntc.nokia.com> wrote:
-
- >There is an algorithm that calculates the last non-zero _binary_ digit
- >of ANY factorial - with SUB-LOGARITHMIC time even in the worst case!!!
-
- >Mail me if interested but be prepared to explain what you need it for.
- >The algorithm is indeed very VERY fast, and so I don't want to give it
- >away without being credited at least. Also, please mention "rightmost
- >non-zero binary digit algorithm" in your request.
-
- Since the ONLY non-zero binary digit is 1, that seems like a fairly
- trivial algorithm. Why all the secrecy?
-
- int nonzero_binary_digit(void)
- {
- return 1;
- }
-
- >terv: Risto
-
- >--
- >Risto Lankinen / System Engineer ***************************************
- >Nokia Telecommunications, * 2 2 *
- >Cellular Data; Helsinki, Finland. * 2 -1 is PRIME! Now working on 2 +1 *
- >risto.lankinen@ntc.nokia.com ***************************************
-
-
- John Breckenridge Boothroyd Dewhurst, Inc.
- johnb@dfma.com all opinions are my own
-
-